/***
 * 开关
 * @type {*[]}
 */
var switchJson = [{code: 0, name: "禁用"}, {code: 1, name: "开启"}];

var switchJsonCss = [{code: 0, name: "禁用", css: "label label-warning"}, {code: 1, name: "开启", css: "label label-success"}];

/**
 * 展示方式
 * @type {*[]}
 */
var showStatusJson = [{code: 0, name: "统一页面"}, {code: 1, name: " 第三方页面"}];


function harCodeName(value, options, row, data, other) {
    for (var o in data) {
        if (value === data[o].code) {
            return data[o].name;
        }
    }
    return other;
};

function harCodeNameWithCss(value, options, row, data, other) {
    for (var o in data) {
        if (value === data[o].code) {
            return '<span class="' + data[o].css + '">' + data[o].name + '</span>';
        }
    }
    return '<span class="label label-danger">' + other + '</span>';
};

